package com.chen.base.module.log.config;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.LoggerContextListener;
import ch.qos.logback.core.spi.ContextAwareBase;
import ch.qos.logback.core.spi.LifeCycle;
import com.chen.base.utils.SystemUtil;

/**
 * logback日志属性配置
 * @author ChenJinLong
 */
@Deprecated
public class LoggerConfig extends ContextAwareBase implements LoggerContextListener, LifeCycle {
	
	@Override
	public void start() {
		String logPath = "D:\\logs";
		if(SystemUtil.isLinux()) {
			logPath = "logs";
		}

		context.putProperty( "path", logPath);
	}
 
	@Override
	public void stop() {}
 
	@Override
	public boolean isStarted() {
		return true;
	}
 
	@Override
	public boolean isResetResistant() {
		return true;
	}
 
	@Override
	public void onStart( LoggerContext context ) {}
 
	@Override
	public void onReset( LoggerContext context ) {}
 
	@Override
	public void onStop( LoggerContext context ) {}
 
	@Override
	public void onLevelChange( Logger logger, Level level ) {}

}